package cn.ycc1.boot3thread.controller;

import cn.ycc1.boot3thread.service.ThreadRedissonService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试多线程使用redisson锁
 * @author ycc
 * @date 2024/7/28
 */
@RestController
@RequestMapping("/thread/redisson")
@RequiredArgsConstructor
public class ThreadRedissonController {
    private final ThreadRedissonService threadRedissonService;

    @GetMapping("/test")
    public String test() {

        threadRedissonService.test();
        return "test";
    }
}
